<%- p params -%>

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- reorganize this, put it at beginner, intermediate and advanced. then let users determine the other data with the expert control. -->
<!-- How to get a success experience out of this? allow dragging of links and text files? allow the user to embed links? that's a good question. I'm not entirely satisfied with the way that web applications work. -->
<!-- put all of this in a box in the center this way it stays relatively accessible to the user even if they expand something.-->
<!-- Let the user save their searches? make the system modal? -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
<head>
	<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
	<meta http-equiv="content-style-type" content="text/css" />

	<title>NAIST Language Tutor</title>
	<link rel="stylesheet" type="text/css" href="/stylesheets/style.css" />

<%= javascript_include_tag :defaults %>
<!--<%= slider_stylesheet %>-->
</head>

<body>

<div id="heading">
<h1>NAIST Language Tutor</h1>
<h2>for students</h2>
</div>

<%= form_tag %>
<div id="input">
<%- if session[:input_text] != nil then -%>
	<%= text_area_tag "text", session[:input_text], :size => "40x10" %>
<%- else -%>
	<%= text_area_tag "text", nil, :size => "40x10" %>
<%- end -%>
</div>

<h3> Sentence Length <%= text_field "wei_sentence", nil, :size => 3 -%>weighted</h3>
<table id="len_settings">
	<tr>
		<td>max:</td>
		<td><%= text_field "sentence_max", nil, :size => 10 %></td>
		<td>words</td>
	</tr>
	<tr>
		<td>min:</td>
		<td><%= text_field "sentence_min", nil, :size => 10 %></td>
		<td>words</td>
	</tr>
</table>
<h3>Grade</h3>
<table id="grade_settings">
	<tr>
		<td>Word:</td>
		<td><%= text_field "word_rank", nil, :size => 10 -%></td>
		<td>Rank</td>
		<td><%= text_field "wei_wrank", nil, :size => 3 -%>weighted</td>
	</tr>
	<tr>
		<td>Kanji:</td>
		<td><%= text_field "kanji_rank", nil, :size => 10 %></td>
		<td>Rank</td>
		<td><%= text_field "wei_krank", nil, :size => 3 -%>weighted</td>
	</tr>
	<tr>
		<td>Grammar:</td>
		<td><%= text_field "bunpou_rank", nil, :size => 10 %></td>
		<td>Rank</td>
		<td><%= text_field "wei_brank", nil, :size => 3 -%>weighted</td>
	</tr>
</table>
<%= submit_to_remote "lookup dictionary", "lookup dictionary",
	:update=>"result",
	:url => {:action=>"show_acceptation" }
 %>
 
<%= check_box("adapted", "visible?") -%>show not adapted sentence

<div id="result"></div>
<%= end_form_tag %>

</body>
</html>
